#include<iostream>

using namespace std;
int main()
{
	int sum = 2;
	int i=2022;
	while(i--)
	{
		sum*=2;
		if(sum>1000)
		{
			sum%=1000;
		}
	}	
	cout << sum;
} 
